package com.class05;

public class LibraryCard {
    private static LibraryCard libraryCard = new LibraryCard();
    //    外面不能创建对象
//    public LibraryCard(){
//    }
    private LibraryCard() {
    }
//    静态方法中只能调用静态方法或者静态属性

    public static LibraryCard getInstance() {
        return libraryCard;
    }

}

class A {
    public static void main(String[] args) {
//        LibraryCard libraryCard = new LibraryCard();
//        System.out.println(LibraryCard.getInstance());
//        System.out.println(LibraryCard.getInstance());
//        System.out.println(LibraryCard.getInstance());
//        System.out.println(LibraryCard.getInstance());
//        int i = 1;
//        if ()

    }
}